Derivatives problem 01.mws

1. Estimating Derivatives.

This exercise will explore using the difference quotient (f(x+h)-f(x))/h for small values of h as well as using graphs to estimate the derivative. Execute the command defining the function f below.

> f:=x->3^x;

f := proc (x) options operator, arrow; 3^x end proc...

It is not so easy to find the limit of this difference quotient (It is essentially impossible to find this limit directly, but mathematics is notorious for having 'sneaky' back door methods for solving problems, and one does exist for this limit).  Let us estimate the value of D(f)(1) . (Note that this is Maple's notation for the derivative of the function f at x = 1 .)  First, let us define a function which evaluates the difference quotient at x = 1 as a function of the variable h . Note that the difference quotient is the expression (3^(1+h)-3)/h .

> Q:=h->(3^(1+h)-3)/h;

Q := proc (h) options operator, arrow; (3^(1+h)-3)/...

This definition will allow us to rapidly evaluate the difference quotient for smaller and smaller values of h .

>Q(1.);Q(.1);Q(0.01);Q(0.001);Q(0.0001);Q(0.00001);Q(0.000001);Q(0.0000001);Q(0.000000001);Q(0.0000000001);

6.000000000

3.483695220

3.314007600

3.297648000

3.296020000

3.295900000

3.296000000

3.300000000

3.000000000

0.

From what we know about round off error, we don't believe the last answer at all, and we wonder about some of the previous ones too. Let us try to get a better estimate by changing the number of significant digits that Maple uses.

> Digits:=30;

Digits := 30

> Q(0.000001);Q(0.0000001);Q(0.000000001);Q(0.0000000001);

3.29583867642843327772087000000

3.29583704704667982591800000000

3.29583686781475251607000000000

3.29583686618537141830000000000

It seems likely that the estimate 3.2958 is accurate to one part in 1/10000. Let us have Maple find the limit of the difference quotient, to give us an exact answer.

> limit(Q(h),h=0);

3*ln(3)

This answer is exact , but let us have Maple give us a floating point estimate of the answer.

> evalf(limit(Q(h),h=0));

3.29583686600432907418573571076

Thus our estimate is confirmed by Maple.  We set Digits back down.

> Digits:=10;

Digits := 10

Next, let us use a graph to estimate the slope by plotting the function and then zooming. Note that the scaling must be constrained to get a realistic idea of the slope in the picture.

> plot(f(x),x=0..2,scaling=constrained);

[Maple Plot]

> plot(f(x),x=.9..1.1,scaling=constrained);

[Maple Plot]

> plot(f(x),x=.99..1.01,scaling=constrained,color=red);

[Maple Plot]

In the last graph, the curve appears to be a straight line (just like the earth appears flat). We see from the graph that the rise is about 0.066, so the slope estimate is

> .066/.02;

3.300000000

Submission:

Using the methods outlined above, find D(g)(Pi/4) where g(x) = tan(x) . So you should show a

Submission worksheet: